﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class add_user_infor : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
      if(func.isinfor(Session["usr"].ToString()))
        {
            Response.Write("<script>alert('您的信息已经完善');location.href='" + Request.UrlReferrer.ToString() + "';</script>");

        }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if(func.ins_infor(Session["usr"].ToString(),txtxm.Text.Trim(),txtxb.Text.Trim(),txtjg.Text.Trim(),txtid.Text.Trim(),int.Parse(txtmoney.Text)))
        {
            Response.Write("<script>alert('插入成功,即将跳转到查询信息页面....');;location.href='search_infor.aspx';</script>");

        }
        else
        {
            Response.Write("<script>alert('插入失败，请稍后再试');</script>");

        }
    }
}